import zbImg from '@/assets/img/zb.png';
import zygzImg from '@/assets/img/zygz.png';
import zdxmImg from '@/assets/img/zdxm.png';
import ywbmImg from '@/assets/img/ywbm.png';
import IndexService from '../../service/index';

export default {
  data() {
    return {
      titleItems: [{
        id: 1,
        name: '指标',
        img: zbImg,
        to_url: '/g-affairs-dashboard'
      }, {
        id: 2,
        name: '重要工作',
        img: zygzImg
      }, {
        id: 3,
        name: '重大项目',
        img: zdxmImg
      }, {
        id: 4,
        name: '业务部门',
        img: ywbmImg
      }]
    }
  },
  methods: {
    clickItem(item) {
      if (item.to_url) {
        this.$router.push({
          path: item.to_url
        })
      }
    },

    requestCallBack(cancel) {
      setTimeout(() => {
        cancel();
      }, 5000);
    }
  },
  mounted() {

    console.log(process);
    // const myMap = new window.ZGMap('map-main')
    new IndexService().getDevelopment({id:1}, {
      cancel: this.requestCallBack
    }).then(res => {
      console.log(res);
    });

    new IndexService().getHomeConfig().then(res => {
      console.log(res);
    });
  },
}